package com.nmsl.membership.service.impl;

import com.nmsl.membership.mapper.RechargeRecordMapper;
import com.nmsl.membership.service.RechargeRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;

@Service
public class RechargeRecordServiceImpl implements RechargeRecordService {

    @Autowired
    private RechargeRecordMapper rechargeRecordMapper;

    @Override
    @Transactional // 确保事务一致性
    public void addRechargeRecord(String zengjiaJine, Integer patientId) {
        // 调用存储过程
        rechargeRecordMapper.callAddRechargeRecord(zengjiaJine, patientId);


    }
    //退款
    @Override
    @Transactional // 确保事务一致性
    public void LessRechargeRecord(String jianshaoJine, Integer patientId) {
        // 调用存储过程
        rechargeRecordMapper.callLessRechargeRecord(jianshaoJine, patientId);
    }

}
